package classes.multithread;

import java.util.concurrent.Callable;

/**
 * @author : DuJiabao
 * @Date : 2021/1/20 15:58
 * @Project : java_learning
 * @File : null.java
 * @Desc :
 */
public class CallableTask implements Callable<String> {
    private static int count;
    private final int id;

    public CallableTask() {
        id = count++;
    }

    @Override
    public String call() throws Exception {
        return Thread.currentThread().getName() + " " + id;
    }
}
